package service

import (
	"context"
	v1 "video-api/api/v1"
)

type ILangService interface {
	LangSwitch(context.Context, string) (string, error) //切换语言
	WriteLangFile(ctx context.Context, req *v1.WriteLangReq) error
}

var iLangInstance ILangService

func LangService() ILangService {
	if iLangInstance == nil {
		panic("iLang is not initialized")
	}
	return iLangInstance
}

func RegisterLangService(i ILangService) {
	iLangInstance = i
}
